package com.vhall.component.controller.filter.facade;

import com.vhall.component.entity.filter.vo.*;
import com.vhall.component.entity.page.vo.PageVO;
import com.vhall.component.plugin.common.annotation.TokenAuth;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;

/**
 * 敏感词-console端接口
 *
 * @author longzhen.gong
 * @date 2021/7/2 14:08
 */
@FeignClient(name = "FilterWordsConsoleFacade", path = "/v4/filterwords/console")
public interface FilterWordsConsoleFacade {

    /**
     * 房间下敏感词分页列表
     *
     * @param reqVO 参数
     * @return 房间下敏感词列表
     */
    @GetMapping("/list")
    @TokenAuth
    PageVO<FilterWordsListRspVO> list(@Validated FilterWordsListReqVO reqVO);

    /**
     * 创建房间下敏感词
     *
     * @param filterWordsCreateReqVo 参数
     * @return 创建后的敏感词对象
     */
    @PostMapping("/create")
    @TokenAuth
    FilterWordsCreateRspVO create(@Validated FilterWordsCreateReqVO filterWordsCreateReqVo);

    /**
     * 更新房间下敏感词
     *
     * @param consoleUpdateRepVo 参数
     * @return 是否更新成功
     */
    @PostMapping("/update")
    @TokenAuth
    Boolean update(@Validated FilterWordsUpdateReqVO consoleUpdateRepVo);

    /**
     * 删除房间下敏感词
     *
     * @param reqVo 参数
     * @return 删除敏感词数量
     */
    @PostMapping("/delete")
    Integer delete(@Validated FilterWordsDeleteReqVO reqVo);

    /**
     * 导入敏感词
     *
     * @param filterWordsConsoleImportVo 参数
     * @return 关键词导入用户返回
     */
    @PostMapping("/import")
    @TokenAuth
    FilterWordsImportRspVO importData(@Validated FilterWordsConsoleImportVO filterWordsConsoleImportVo);

    /**
     * 导出敏感词
     *
     * @param filterWordsConsoleExportVo 导出敏感词
     * @return 是否导出成功
     */
    @PostMapping("/export")
    @TokenAuth
    Boolean exportSendFilterWords(@Validated FilterWordsConsoleExportVO filterWordsConsoleExportVo);

    /**
     * 获取敏感词
     *
     * @param vo 参数
     * @return keywords with "," join
     */
    @GetMapping("/get-filter-words")
    String getFilterWords(@Validated FilterWordsGetReqVO vo);

    /**
     * 上报敏感词
     *
     * @param reqVo 参数
     * @return 是否上报成功
     */
    @PostMapping("/report-filter-words")
    @TokenAuth
    Boolean reportFilterWords(@Validated FilterWordsReportReqVO reqVo);

}
